package net.lainiao.zhihu.control.admin;

import net.lainiao.zhihu.backserver.BackServer;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by Administrator on 2016/1/15.
 */
@Controller
@RequestMapping(value = "/admin/server")
public class ServerControl {
    @Resource
    BackServer backServer;
    @RequestMapping(method = RequestMethod.GET)
    public String index() {
        return "admin/server";
    }

    @ResponseBody
    @RequestMapping(value = "/setServer")
    public String setServer(@RequestParam("mess") String mess) {
        mess=BackServer.setServer(mess);
        return mess;
    }
}
